package com.zeus.monitor;

import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.Metrics;

/**
 * Counter demo
 */
public class CounterDemo {

    static final Counter USER_COUNTER = Metrics.counter("user.counter.total", "service", "demo");

    public void processCollectResult() throws InterruptedException {
        while (true) {
            USER_COUNTER.increment(1D);
            Thread.sleep(1000);
        }
    }
}
